import React, { Component } from 'react';
import { Message } from 'semantic-ui-react'

class MessageDiv extends Component {

  render() {
    return (
      <div>
        {
          
          Object.keys(this.props.message).map((errorType) => {
            let messageProp = {};
            messageProp[errorType] = true;
            return (
              <Message size="mini" {...messageProp} list={this.props.message[errorType].map(elem => elem.join(';'))}/>
            )
          })
        }
      </div>
    );
  }
}

export default MessageDiv;